Computing programs are often organized into subroutines. A subroutine is a portion of computing code within a larger computing program that performs a task, usually to further completion or enable functionality of the computing program of which it is a part. Subroutines have many benefits, such as reducing duplication of code in a program, reusing code across numerous programs, and improving a program's readability. In many cases they are also relatively easy for computer programmers to write.
A computing program may call a subroutine, at which point a processor begins to execute the subroutine. The processor often continues to execute the subroutine until the subroutine returns a result. The processor may then move on to other subroutines.
This process of running subroutines can be organized into a call stack. A typical call stack stores information about active subroutines of a computing program so that the computer can know the point at which each active subroutine returns control of the processor when that subroutine finishes executing and returns a result.
Some of these subroutines, however, can be time consuming to complete. In such cases, a processor occupied with that subroutine is unable to work on other subroutines for a long period. This can be unacceptable if the processor is occupied for too long, such when that processor is needed to perform actions or subroutines for other programs that need attention.
Further, in some cases subroutines may prevent a processor from fully utilizing its processing power, such as when a processor is occupied with a subroutine but is partly idle. This can happen when a processor is occupied with a subroutine that cannot complete without help from some other computing entity, such as a hard disk drive providing information used by the subroutine.